cleanup: no need to set members to null when freeing the struct
authorPaolo Borelli <pborelli@gnome.org>
Sat, 1 Aug 2015 19:30:53 +0000 (21:30 +0200)
committerPaolo Borelli <pborelli@gnome.org>
Sat, 1 Aug 2015 19:30:53 +0000 (21:30 +0200)
gtk/gtkrecentmanager.c

index ce749908a50648c522d8c1dd98060235c59a03ae..38c0d8fce023b18ac109fd48e7b64e3def8c3480 100644 (file)
@@ -1495,20 +1495,12 @@ gtk_recent_info_free (GtkRecentInfo *recent_info)
   g_free (recent_info->description);
   g_free (recent_info->mime_type);
 
-  if (recent_info->applications)
-    {
-      g_slist_free_full (recent_info->applications, (GDestroyNotify)recent_app_info_free);
-      recent_info->applications = NULL;
-    }
+  g_slist_free_full (recent_info->applications, (GDestroyNotify)recent_app_info_free);
 
   if (recent_info->apps_lookup)
     g_hash_table_destroy (recent_info->apps_lookup);
 
-  if (recent_info->groups)
-    {
-      g_slist_free_full (recent_info->groups, g_free);
-      recent_info->groups = NULL;
-    }
+  g_slist_free_full (recent_info->groups, g_free);
 
   if (recent_info->icon)
     g_object_unref (recent_info->icon);